package demo.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import demo.user.pojo.Menu;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LonelySnow
 * @since 2020-06-15
 */
public interface MenuMapper extends BaseMapper<Menu> {

    @Select("SELECT m.* FROM status_menu sm, menu m WHERE sm.menu_id = m.id AND sm.status_id = #{uid} AND m.url = #{uri}")
    List<Menu> getUserMenu(@Param("uid") Long uid, @Param("uri") String uri);
}
